﻿//This is a cmocean colormap
//All credit to Kristen Thyng
//This colormap is under the MIT License
//All cmocean colormaps are available at https://github.com/matplotlib/cmocean/tree/master/cmocean/rgb

namespace ScottPlot.Drawing.Colormaps
{
    public class Curl : IColormap
    {
        public string Name => "Curl";

        public (byte r, byte g, byte b) GetRGB(byte value) =>
            (cmaplocal[value, 0], cmaplocal[value, 1], cmaplocal[value, 2]);

        private static readonly byte[,] cmaplocal = {
            { 21, 29, 68 },
            { 21, 31, 69 },
            { 22, 33, 70 },
            { 22, 35, 71 },
            { 23, 37, 72 },
            { 23, 39, 73 },
            { 24, 41, 74 },
            { 24, 43, 75 },
            { 24, 45, 76 },
            { 25, 47, 77 },
            { 25, 49, 79 },
            { 26, 51, 80 },
            { 26, 53, 81 },
            { 26, 54, 82 },
            { 27, 56, 83 },
            { 27, 58, 84 },
            { 27, 60, 86 },
            { 27, 62, 87 },
            { 28, 64, 88 },
            { 28, 66, 89 },
            { 28, 67, 90 },
            { 28, 69, 91 },
            { 28, 71, 93 },
            { 28, 73, 94 },
            { 28, 75, 95 },
            { 28, 76, 96 },
            { 28, 78, 97 },
            { 28, 80, 98 },
            { 28, 82, 99 },
            { 28, 84, 101 },
            { 27, 86, 102 },
            { 27, 88, 103 },
            { 27, 89, 104 },
            { 26, 91, 105 },
            { 26, 93, 106 },
            { 26, 95, 107 },
            { 25, 97, 108 },
            { 25, 99, 109 },
            { 24, 101, 110 },
            { 23, 102, 111 },
            { 23, 104, 112 },
            { 22, 106, 113 },
            { 21, 108, 114 },
            { 20, 110, 115 },
            { 20, 112, 116 },
            { 19, 114, 117 },
            { 18, 116, 118 },
            { 18, 118, 118 },
            { 17, 119, 119 },
            { 17, 121, 120 },
            { 17, 123, 121 },
            { 17, 125, 121 },
            { 17, 127, 122 },
            { 18, 129, 123 },
            { 19, 131, 123 },
            { 20, 132, 124 },
            { 22, 134, 124 },
            { 23, 136, 125 },
            { 26, 138, 125 },
            { 28, 140, 126 },
            { 31, 141, 126 },
            { 34, 143, 126 },
            { 37, 145, 127 },
            { 41, 147, 127 },
            { 44, 148, 127 },
            { 48, 150, 128 },
            { 52, 152, 128 },
            { 56, 153, 129 },
            { 59, 155, 129 },
            { 63, 156, 129 },
            { 67, 158, 130 },
            { 71, 159, 130 },
            { 75, 161, 131 },
            { 80, 162, 132 },
            { 84, 164, 132 },
            { 87, 165, 133 },
            { 91, 166, 134 },
            { 95, 168, 135 },
            { 99, 169, 136 },
            { 103, 171, 137 },
            { 107, 172, 138 },
            { 111, 173, 139 },
            { 114, 175, 140 },
            { 118, 176, 141 },
            { 122, 177, 142 },
            { 125, 179, 144 },
            { 129, 180, 145 },
            { 133, 181, 147 },
            { 136, 183, 148 },
            { 139, 184, 150 },
            { 143, 186, 151 },
            { 146, 187, 153 },
            { 150, 188, 155 },
            { 153, 190, 157 },
            { 156, 191, 159 },
            { 160, 192, 160 },
            { 163, 194, 162 },
            { 166, 195, 164 },
            { 169, 197, 166 },
            { 172, 198, 169 },
            { 176, 200, 171 },
            { 179, 201, 173 },
            { 182, 203, 175 },
            { 185, 204, 178 },
            { 188, 206, 180 },
            { 191, 207, 182 },
            { 194, 209, 185 },
            { 197, 210, 187 },
            { 200, 212, 190 },
            { 203, 213, 192 },
            { 206, 215, 195 },
            { 209, 216, 197 },
            { 211, 218, 200 },
            { 214, 220, 203 },
            { 217, 221, 205 },
            { 220, 223, 208 },
            { 223, 225, 211 },
            { 226, 226, 214 },
            { 228, 228, 216 },
            { 231, 230, 219 },
            { 234, 232, 222 },
            { 237, 234, 225 },
            { 240, 235, 228 },
            { 242, 237, 231 },
            { 245, 239, 234 },
            { 248, 241, 237 },
            { 251, 243, 240 },
            { 253, 245, 243 },
            { 254, 246, 245 },
            { 252, 244, 241 },
            { 251, 241, 238 },
            { 250, 239, 235 },
            { 249, 236, 231 },
            { 248, 234, 228 },
            { 246, 231, 225 },
            { 245, 229, 221 },
            { 244, 226, 218 },
            { 243, 224, 214 },
            { 242, 221, 211 },
            { 242, 219, 208 },
            { 241, 216, 204 },
            { 240, 214, 201 },
            { 239, 211, 198 },
            { 238, 209, 195 },
            { 237, 207, 191 },
            { 236, 204, 188 },
            { 236, 202, 185 },
            { 235, 199, 182 },
            { 234, 197, 179 },
            { 233, 194, 175 },
            { 233, 192, 172 },
            { 232, 189, 169 },
            { 231, 187, 166 },
            { 231, 184, 163 },
            { 230, 182, 160 },
            { 229, 179, 157 },
            { 229, 177, 154 },
            { 228, 174, 152 },
            { 227, 172, 149 },
            { 227, 169, 146 },
            { 226, 167, 143 },
            { 225, 164, 141 },
            { 225, 162, 138 },
            { 224, 159, 136 },
            { 224, 157, 133 },
            { 223, 154, 131 },
            { 222, 152, 128 },
            { 222, 149, 126 },
            { 221, 147, 124 },
            { 220, 144, 122 },
            { 219, 142, 120 },
            { 219, 139, 118 },
            { 218, 137, 116 },
            { 217, 134, 114 },
            { 216, 132, 113 },
            { 215, 129, 111 },
            { 214, 127, 110 },
            { 214, 124, 108 },
            { 213, 122, 107 },
            { 212, 119, 106 },
            { 211, 117, 105 },
            { 210, 114, 104 },
            { 208, 112, 103 },
            { 207, 110, 102 },
            { 206, 107, 101 },
            { 205, 105, 100 },
            { 204, 103, 100 },
            { 202, 100, 99 },
            { 201, 98, 99 },
            { 200, 96, 98 },
            { 198, 93, 98 },
            { 197, 91, 97 },
            { 195, 89, 97 },
            { 194, 87, 97 },
            { 192, 85, 97 },
            { 191, 83, 96 },
            { 189, 81, 96 },
            { 187, 78, 96 },
            { 186, 76, 96 },
            { 184, 74, 96 },
            { 182, 72, 96 },
            { 180, 70, 96 },
            { 179, 68, 96 },
            { 177, 66, 96 },
            { 175, 65, 96 },
            { 173, 63, 96 },
            { 171, 61, 96 },
            { 169, 59, 96 },
            { 167, 57, 96 },
            { 165, 55, 96 },
            { 163, 54, 96 },
            { 161, 52, 96 },
            { 159, 50, 96 },
            { 157, 48, 96 },
            { 155, 47, 96 },
            { 153, 45, 97 },
            { 151, 43, 97 },
            { 149, 42, 97 },
            { 146, 40, 97 },
            { 144, 39, 96 },
            { 142, 37, 96 },
            { 140, 36, 96 },
            { 137, 34, 96 },
            { 135, 33, 96 },
            { 133, 32, 96 },
            { 130, 31, 96 },
            { 128, 29, 95 },
            { 125, 28, 95 },
            { 123, 27, 94 },
            { 120, 26, 94 },
            { 118, 25, 93 },
            { 115, 25, 93 },
            { 113, 24, 92 },
            { 110, 23, 91 },
            { 108, 23, 90 },
            { 105, 22, 89 },
            { 102, 22, 88 },
            { 100, 21, 87 },
            { 97, 21, 86 },
            { 94, 20, 85 },
            { 92, 20, 83 },
            { 89, 20, 82 },
            { 87, 19, 80 },
            { 84, 19, 78 },
            { 81, 19, 77 },
            { 79, 18, 75 },
            { 76, 18, 73 },
            { 73, 18, 71 },
            { 71, 17, 69 },
            { 68, 17, 67 },
            { 66, 16, 65 },
            { 63, 16, 63 },
            { 61, 15, 61 },
            { 58, 15, 59 },
            { 56, 14, 57 },
            { 53, 13, 54 }

        };
    }
}

